package com.pucheng.bracelet.app.database.dao

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.Query
import com.pucheng.bracelet.data.bean.BloodPressureBean
import kotlinx.coroutines.flow.Flow

/**
 * 血氧饱和度Dao
 */
@Dao
interface BPDao {

    @Insert
    suspend fun insert(vararg BloodPressureBean: BloodPressureBean)

    @Query("SELECT * FROM blood_pressure")
    fun getAll(): Flow<List<BloodPressureBean>>

    @Query("SELECT * FROM blood_pressure limit 0,7")
    fun get7Days(): Flow<List<BloodPressureBean>>

}